import { ipcMain } from 'electron';
import * as query from './query'
import type { IpcMainInvokeEvent } from 'electron';

ipcMain.handle(
  'sql',
  (_event: IpcMainInvokeEvent, sql: string, type: QueryAction, data = {}) => {
    return query[type](sql, data)
  },
)